import java.io.File;
import java.util.ArrayList;

import org.jdom.Element;



import fileIO.XMLParser;

public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String filePath = "stuff/";
		ArrayList<String> keyList = new ArrayList<String>();
		File file = new File(filePath);
		File[] fileAry = file.listFiles();
		for(File fileElement:fileAry){
			Element root = XMLParser.parseDocument(fileElement.getAbsolutePath());
			Element key = root.getChild("ID").getChild("KEY");
			String mblhblkey = key.getChildText("MBL_NO")+","+key.getChildText("HBL_NO");
			if(!keyList.contains(mblhblkey)){
				keyList.add(mblhblkey);
			}
		}
		
		for(String keyElement:keyList){
			System.out.println(keyElement);
		}
	}

}
